#【练习】数据统计
def data_sta(data):
    sum=0
    max=None
    min=None
    i=0
    m=len(data)
    while i<m:
        n=data[i]
        sum += n
        if max==None or max< n  :
            max=n
        if min==None or min> n  :
            min=n
        i+=1
    avg=float(sum/m)
    return sum,min,max,avg
data=[1,2,3,4,5,6,7,8,9]
print(data_sta(data))